package com.warm.pump.module.work.dao.gen;

import java.util.List;
import java.util.Map;
import java.util.Date;
import java.math.BigDecimal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import com.warm.pump.frame.gen.bean.PageBean;
import com.warm.pump.frame.gen.util.TypeCast;
import com.warm.pump.frame.gen.exception.ServiceException;
import com.warm.pump.module.work.bean.po.gen.WorkItem;
import com.warm.pump.module.work.mapper.gen.WorkItemMapper;
import com.warm.pump.module.work.bean.po.gen.WorkItemExample;

@Repository
public class WorkItemDao {
    // 日志对象
    private transient Log log = LogFactory.getLog(this.getClass());
    @Autowired
    private WorkItemMapper workItemMapper;

    // 增加一个后台WorkItem表

    public boolean insert(WorkItem workItem) {
        try {
            workItemMapper.insert(workItem);
            log.debug("后台WorkItem表增加成功");
            return true;
        } catch (Exception e) {
            log.debug("后台WorkItem表增加失败");
            throw new ServiceException("后台WorkItem表增加失败", e);
        }
    }
    // 增加一个后台WorkItem表Selective

    public boolean insertSelective(WorkItem workItem) {
        try {
            workItemMapper.insertSelective(workItem);
            log.debug("后台WorkItem表增加成功");
            return true;
        } catch (Exception e) {
            log.debug("后台WorkItem表增加失败");
            throw new ServiceException("后台WorkItem表增加失败", e);
        }
    }

    // 删除一个后台WorkItem表

    public boolean deleteByPrimaryKey(Long id) {
        try {
            workItemMapper.deleteByPrimaryKey(id);
            log.debug("后台WorkItem表删除成功");
            return true;
        } catch (Exception e) {
            log.debug("后台WorkItem表删除失败");
            throw new ServiceException("后台WorkItem表删除失败", e);
        }
    }
    // 删除一个后台WorkItem表byMap

    public boolean deleteByMap(Map workItemMap) {
        try {
            workItemMapper.deleteByExample(createWorkItemExample(workItemMap, null, null));
            log.debug("后台WorkItem根据Map删除成功");
            return true;
        } catch (Exception e) {
            log.debug("后台WorkItem根据GroupID删除失败");
            throw new ServiceException("后台WorkItem根据object删除失败", e);
        }
    }
    // 修改一个后台WorkItem表

    public boolean updateByPrimaryKey(WorkItem workItem) {
        try {
            workItemMapper.updateByPrimaryKey(workItem);
            log.debug("后台WorkItem表修改成功");
            return true;
        } catch (Exception e) {
            log.debug("后台WorkItem表修改失败");
            throw new ServiceException("后台WorkItem表修改失败", e);
        }
    }
    // 修改一个后台WorkItem表Selective

    public boolean updateByPrimaryKeySelective(WorkItem workItem) {
        try {
            workItemMapper.updateByPrimaryKeySelective(workItem);
            log.debug("后台WorkItem表修改成功");
            return true;
        } catch (Exception e) {
            log.debug("后台WorkItem表修改失败");
            throw new ServiceException("后台WorkItem表修改失败", e);
        }
    }
    // 修改一个后台WorkItem表

    public boolean updateByMap(WorkItem workItem, Map workItemMap) {
        try {
            workItemMapper.updateByExample(workItem, createWorkItemExample(workItemMap, null, null));
            log.debug("后台批量WorkItem表修改成功");
            return true;
        } catch (Exception e) {
            log.debug("后台批量WorkItem表修改失败");
            throw new ServiceException("后台WorkItem表批量修改失败", e);
        }
    }
    // 修改一个后台WorkItem表Selective

    public boolean updateByMapSelective(WorkItem workItem, Map workItemMap) {
        try {
            workItemMapper.updateByExampleSelective(workItem, createWorkItemExample(workItemMap, null, null));
            log.debug("后台批量WorkItem表修改成功");
            return true;
        } catch (Exception e) {
            log.debug("后台批量WorkItem表修改失败");
            throw new ServiceException("后台WorkItem表批量修改失败", e);
        }
    }

    // 查询一个后台WorkItem表

    public WorkItem selectByPrimaryKey(Long id) {
        return workItemMapper.selectByPrimaryKey(id);
    }

    // 查询一个后台WorkItem表-根据map

    public WorkItem selectByMap(Map workItemMap) {
        List<WorkItem> list = getListByMap(workItemMap);
        if (list == null || list.isEmpty()) {
            return null;
        } else {
            return list.get(0);
        }
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 查询所有后台WorkItem表

    public List<WorkItem> getListByMap(Map workItemMap) {

        return workItemMapper.selectByExample(createWorkItemExample(workItemMap, null, null));
    }

    //统计后台WorkItem表数量

    public int countTotalByMap(Map workItemMap) {

        return workItemMapper.countByExample(createWorkItemExample(workItemMap, null, null));
    }


    public List<WorkItem> getListByMapPage(Map workItemMap, int limitStart,
                                           int limitOffset) {

        return workItemMapper.selectByExample(createWorkItemExample(workItemMap, limitStart, limitOffset));
    }


    public PageBean getPageBeanByMap(Map workItemMap, int pageNo, int pageSize) {
        Integer count = countTotalByMap(workItemMap);
        PageBean pageBean = new PageBean();
        pageBean.setCount(count);
        pageBean.setPageNo(pageNo);
        pageBean.setPageSize(pageSize);
        int limitStart = pageBean.getStartNo();
        int limitOffset = pageSize;
        pageBean.setData(workItemMapper.selectByExample(createWorkItemExample(workItemMap, limitStart, limitOffset)));
        return pageBean;
    }

    private WorkItemExample createWorkItemExample(Map workItemMap, Integer limitStart, Integer limitOffset) {
        WorkItemExample workItemEx = new WorkItemExample();
        WorkItemExample.Criteria c = workItemEx.createCriteria();
        Long id_null = TypeCast.getLong(workItemMap.get("id_null"));
        Long id_notNull = TypeCast.getLong(workItemMap.get("id_notNull"));
        Long id = TypeCast.getLong(workItemMap.get("id"));
        Long id_not = TypeCast.getLong(workItemMap.get("id_not"));
        Long id_greater = TypeCast.getLong(workItemMap.get("id_greater"));
        Long id_greaterEqual = TypeCast.getLong(workItemMap.get("id_greaterEqual"));
        Long id_less = TypeCast.getLong(workItemMap.get("id_less"));
        Long id_lessEqual = TypeCast.getLong(workItemMap.get("id_lessEqual"));
        List<Long> id_in = TypeCast.getLongList(workItemMap.get("id_in"));
        List<Long> id_notIn = TypeCast.getLongList(workItemMap.get("id_notIn"));
        Long id_between1 = TypeCast.getLong(workItemMap.get("id_between1"));
        Long id_between2 = TypeCast.getLong(workItemMap.get("id_between2"));
        Long id_notBetween1 = TypeCast.getLong(workItemMap.get("id_notBetween1"));
        Long id_notBetween2 = TypeCast.getLong(workItemMap.get("id_notBetween2"));

        if (id_null != null) {
            c.andIdIsNull();
        }
        if (id_notNull != null) {
            c.andIdIsNotNull();
        }
        if (id != null) {
            c.andIdEqualTo(id);
        }
        if (id_not != null) {
            c.andIdNotEqualTo(id_not);
        }
        if (id_greater != null) {
            c.andIdGreaterThan(id_greater);
        }
        if (id_greaterEqual != null) {
            c.andIdGreaterThanOrEqualTo(id_greaterEqual);
        }
        if (id_less != null) {
            c.andIdLessThan(id_less);
        }
        if (id_lessEqual != null) {
            c.andIdLessThanOrEqualTo(id_lessEqual);
        }
        if (id_in != null) {
            c.andIdIn(id_in);
        }
        if (id_notIn != null) {
            c.andIdNotIn(id_notIn);
        }
        if (id_between1 != null) {
            c.andIdBetween(id_between1, id_between2);
        }
        if (id_notBetween1 != null) {
            c.andIdNotBetween(id_notBetween1, id_notBetween2);
        }
        Long workId_null = TypeCast.getLong(workItemMap.get("workId_null"));
        Long workId_notNull = TypeCast.getLong(workItemMap.get("workId_notNull"));
        Long workId = TypeCast.getLong(workItemMap.get("workId"));
        Long workId_not = TypeCast.getLong(workItemMap.get("workId_not"));
        Long workId_greater = TypeCast.getLong(workItemMap.get("workId_greater"));
        Long workId_greaterEqual = TypeCast.getLong(workItemMap.get("workId_greaterEqual"));
        Long workId_less = TypeCast.getLong(workItemMap.get("workId_less"));
        Long workId_lessEqual = TypeCast.getLong(workItemMap.get("workId_lessEqual"));
        List<Long> workId_in = TypeCast.getLongList(workItemMap.get("workId_in"));
        List<Long> workId_notIn = TypeCast.getLongList(workItemMap.get("workId_notIn"));
        Long workId_between1 = TypeCast.getLong(workItemMap.get("workId_between1"));
        Long workId_between2 = TypeCast.getLong(workItemMap.get("workId_between2"));
        Long workId_notBetween1 = TypeCast.getLong(workItemMap.get("workId_notBetween1"));
        Long workId_notBetween2 = TypeCast.getLong(workItemMap.get("workId_notBetween2"));

        if (workId_null != null) {
            c.andWorkIdIsNull();
        }
        if (workId_notNull != null) {
            c.andWorkIdIsNotNull();
        }
        if (workId != null) {
            c.andWorkIdEqualTo(workId);
        }
        if (workId_not != null) {
            c.andWorkIdNotEqualTo(workId_not);
        }
        if (workId_greater != null) {
            c.andWorkIdGreaterThan(workId_greater);
        }
        if (workId_greaterEqual != null) {
            c.andWorkIdGreaterThanOrEqualTo(workId_greaterEqual);
        }
        if (workId_less != null) {
            c.andWorkIdLessThan(workId_less);
        }
        if (workId_lessEqual != null) {
            c.andWorkIdLessThanOrEqualTo(workId_lessEqual);
        }
        if (workId_in != null) {
            c.andWorkIdIn(workId_in);
        }
        if (workId_notIn != null) {
            c.andWorkIdNotIn(workId_notIn);
        }
        if (workId_between1 != null) {
            c.andWorkIdBetween(workId_between1, workId_between2);
        }
        if (workId_notBetween1 != null) {
            c.andWorkIdNotBetween(workId_notBetween1, workId_notBetween2);
        }
        String itemName_null = TypeCast.getString(workItemMap.get("itemName_null"));
        String itemName_notNull = TypeCast.getString(workItemMap.get("itemName_notNull"));
        String itemName = TypeCast.getString(workItemMap.get("itemName"));
        String itemName_not = TypeCast.getString(workItemMap.get("itemName_not"));
        String itemName_greater = TypeCast.getString(workItemMap.get("itemName_greater"));
        String itemName_greaterEqual = TypeCast.getString(workItemMap.get("itemName_greaterEqual"));
        String itemName_less = TypeCast.getString(workItemMap.get("itemName_less"));
        String itemName_lessEqual = TypeCast.getString(workItemMap.get("itemName_lessEqual"));
        String itemName_like = TypeCast.getString(workItemMap.get("itemName_like"));
        String itemName_notLike = TypeCast.getString(workItemMap.get("itemName_notLike"));
        List<String> itemName_in = TypeCast.getStringList(workItemMap.get("itemName_in"));
        List<String> itemName_notIn = TypeCast.getStringList(workItemMap.get("itemName_notIn"));
        String itemName_between1 = TypeCast.getString(workItemMap.get("itemName_between1"));
        String itemName_between2 = TypeCast.getString(workItemMap.get("itemName_between2"));
        String itemName_notBetween1 = TypeCast.getString(workItemMap.get("itemName_notBetween1"));
        String itemName_notBetween2 = TypeCast.getString(workItemMap.get("itemName_notBetween2"));

        if (itemName_null != null) {
            c.andItemNameIsNull();
        }
        if (itemName_notNull != null) {
            c.andItemNameIsNotNull();
        }
        if (itemName != null) {
            c.andItemNameEqualTo(itemName);
        }
        if (itemName_not != null) {
            c.andItemNameNotEqualTo(itemName_not);
        }
        if (itemName_greater != null) {
            c.andItemNameGreaterThan(itemName_greater);
        }
        if (itemName_greaterEqual != null) {
            c.andItemNameGreaterThanOrEqualTo(itemName_greaterEqual);
        }
        if (itemName_less != null) {
            c.andItemNameLessThan(itemName_less);
        }
        if (itemName_lessEqual != null) {
            c.andItemNameLessThanOrEqualTo(itemName_lessEqual);
        }
        if (itemName_like != null) {
            c.andItemNameLike(itemName_like);
        }
        if (itemName_notLike != null) {
            c.andItemNameNotLike(itemName_notLike);
        }
        if (itemName_in != null) {
            c.andItemNameIn(itemName_in);
        }
        if (itemName_notIn != null) {
            c.andItemNameNotIn(itemName_notIn);
        }
        if (itemName_between1 != null) {
            c.andItemNameBetween(itemName_between1, itemName_between2);
        }
        if (itemName_notBetween1 != null) {
            c.andItemNameNotBetween(itemName_notBetween1, itemName_notBetween2);
        }
        String detailMode_null = TypeCast.getString(workItemMap.get("detailMode_null"));
        String detailMode_notNull = TypeCast.getString(workItemMap.get("detailMode_notNull"));
        String detailMode = TypeCast.getString(workItemMap.get("detailMode"));
        String detailMode_not = TypeCast.getString(workItemMap.get("detailMode_not"));
        String detailMode_greater = TypeCast.getString(workItemMap.get("detailMode_greater"));
        String detailMode_greaterEqual = TypeCast.getString(workItemMap.get("detailMode_greaterEqual"));
        String detailMode_less = TypeCast.getString(workItemMap.get("detailMode_less"));
        String detailMode_lessEqual = TypeCast.getString(workItemMap.get("detailMode_lessEqual"));
        String detailMode_like = TypeCast.getString(workItemMap.get("detailMode_like"));
        String detailMode_notLike = TypeCast.getString(workItemMap.get("detailMode_notLike"));
        List<String> detailMode_in = TypeCast.getStringList(workItemMap.get("detailMode_in"));
        List<String> detailMode_notIn = TypeCast.getStringList(workItemMap.get("detailMode_notIn"));
        String detailMode_between1 = TypeCast.getString(workItemMap.get("detailMode_between1"));
        String detailMode_between2 = TypeCast.getString(workItemMap.get("detailMode_between2"));
        String detailMode_notBetween1 = TypeCast.getString(workItemMap.get("detailMode_notBetween1"));
        String detailMode_notBetween2 = TypeCast.getString(workItemMap.get("detailMode_notBetween2"));

        if (detailMode_null != null) {
            c.andDetailModeIsNull();
        }
        if (detailMode_notNull != null) {
            c.andDetailModeIsNotNull();
        }
        if (detailMode != null) {
            c.andDetailModeEqualTo(detailMode);
        }
        if (detailMode_not != null) {
            c.andDetailModeNotEqualTo(detailMode_not);
        }
        if (detailMode_greater != null) {
            c.andDetailModeGreaterThan(detailMode_greater);
        }
        if (detailMode_greaterEqual != null) {
            c.andDetailModeGreaterThanOrEqualTo(detailMode_greaterEqual);
        }
        if (detailMode_less != null) {
            c.andDetailModeLessThan(detailMode_less);
        }
        if (detailMode_lessEqual != null) {
            c.andDetailModeLessThanOrEqualTo(detailMode_lessEqual);
        }
        if (detailMode_like != null) {
            c.andDetailModeLike(detailMode_like);
        }
        if (detailMode_notLike != null) {
            c.andDetailModeNotLike(detailMode_notLike);
        }
        if (detailMode_in != null) {
            c.andDetailModeIn(detailMode_in);
        }
        if (detailMode_notIn != null) {
            c.andDetailModeNotIn(detailMode_notIn);
        }
        if (detailMode_between1 != null) {
            c.andDetailModeBetween(detailMode_between1, detailMode_between2);
        }
        if (detailMode_notBetween1 != null) {
            c.andDetailModeNotBetween(detailMode_notBetween1, detailMode_notBetween2);
        }
        String beanName_null = TypeCast.getString(workItemMap.get("beanName_null"));
        String beanName_notNull = TypeCast.getString(workItemMap.get("beanName_notNull"));
        String beanName = TypeCast.getString(workItemMap.get("beanName"));
        String beanName_not = TypeCast.getString(workItemMap.get("beanName_not"));
        String beanName_greater = TypeCast.getString(workItemMap.get("beanName_greater"));
        String beanName_greaterEqual = TypeCast.getString(workItemMap.get("beanName_greaterEqual"));
        String beanName_less = TypeCast.getString(workItemMap.get("beanName_less"));
        String beanName_lessEqual = TypeCast.getString(workItemMap.get("beanName_lessEqual"));
        String beanName_like = TypeCast.getString(workItemMap.get("beanName_like"));
        String beanName_notLike = TypeCast.getString(workItemMap.get("beanName_notLike"));
        List<String> beanName_in = TypeCast.getStringList(workItemMap.get("beanName_in"));
        List<String> beanName_notIn = TypeCast.getStringList(workItemMap.get("beanName_notIn"));
        String beanName_between1 = TypeCast.getString(workItemMap.get("beanName_between1"));
        String beanName_between2 = TypeCast.getString(workItemMap.get("beanName_between2"));
        String beanName_notBetween1 = TypeCast.getString(workItemMap.get("beanName_notBetween1"));
        String beanName_notBetween2 = TypeCast.getString(workItemMap.get("beanName_notBetween2"));

        if (beanName_null != null) {
            c.andBeanNameIsNull();
        }
        if (beanName_notNull != null) {
            c.andBeanNameIsNotNull();
        }
        if (beanName != null) {
            c.andBeanNameEqualTo(beanName);
        }
        if (beanName_not != null) {
            c.andBeanNameNotEqualTo(beanName_not);
        }
        if (beanName_greater != null) {
            c.andBeanNameGreaterThan(beanName_greater);
        }
        if (beanName_greaterEqual != null) {
            c.andBeanNameGreaterThanOrEqualTo(beanName_greaterEqual);
        }
        if (beanName_less != null) {
            c.andBeanNameLessThan(beanName_less);
        }
        if (beanName_lessEqual != null) {
            c.andBeanNameLessThanOrEqualTo(beanName_lessEqual);
        }
        if (beanName_like != null) {
            c.andBeanNameLike(beanName_like);
        }
        if (beanName_notLike != null) {
            c.andBeanNameNotLike(beanName_notLike);
        }
        if (beanName_in != null) {
            c.andBeanNameIn(beanName_in);
        }
        if (beanName_notIn != null) {
            c.andBeanNameNotIn(beanName_notIn);
        }
        if (beanName_between1 != null) {
            c.andBeanNameBetween(beanName_between1, beanName_between2);
        }
        if (beanName_notBetween1 != null) {
            c.andBeanNameNotBetween(beanName_notBetween1, beanName_notBetween2);
        }
        String params_null = TypeCast.getString(workItemMap.get("params_null"));
        String params_notNull = TypeCast.getString(workItemMap.get("params_notNull"));
        String params = TypeCast.getString(workItemMap.get("params"));
        String params_not = TypeCast.getString(workItemMap.get("params_not"));
        String params_greater = TypeCast.getString(workItemMap.get("params_greater"));
        String params_greaterEqual = TypeCast.getString(workItemMap.get("params_greaterEqual"));
        String params_less = TypeCast.getString(workItemMap.get("params_less"));
        String params_lessEqual = TypeCast.getString(workItemMap.get("params_lessEqual"));
        String params_like = TypeCast.getString(workItemMap.get("params_like"));
        String params_notLike = TypeCast.getString(workItemMap.get("params_notLike"));
        List<String> params_in = TypeCast.getStringList(workItemMap.get("params_in"));
        List<String> params_notIn = TypeCast.getStringList(workItemMap.get("params_notIn"));
        String params_between1 = TypeCast.getString(workItemMap.get("params_between1"));
        String params_between2 = TypeCast.getString(workItemMap.get("params_between2"));
        String params_notBetween1 = TypeCast.getString(workItemMap.get("params_notBetween1"));
        String params_notBetween2 = TypeCast.getString(workItemMap.get("params_notBetween2"));

        if (params_null != null) {
            c.andParamsIsNull();
        }
        if (params_notNull != null) {
            c.andParamsIsNotNull();
        }
        if (params != null) {
            c.andParamsEqualTo(params);
        }
        if (params_not != null) {
            c.andParamsNotEqualTo(params_not);
        }
        if (params_greater != null) {
            c.andParamsGreaterThan(params_greater);
        }
        if (params_greaterEqual != null) {
            c.andParamsGreaterThanOrEqualTo(params_greaterEqual);
        }
        if (params_less != null) {
            c.andParamsLessThan(params_less);
        }
        if (params_lessEqual != null) {
            c.andParamsLessThanOrEqualTo(params_lessEqual);
        }
        if (params_like != null) {
            c.andParamsLike(params_like);
        }
        if (params_notLike != null) {
            c.andParamsNotLike(params_notLike);
        }
        if (params_in != null) {
            c.andParamsIn(params_in);
        }
        if (params_notIn != null) {
            c.andParamsNotIn(params_notIn);
        }
        if (params_between1 != null) {
            c.andParamsBetween(params_between1, params_between2);
        }
        if (params_notBetween1 != null) {
            c.andParamsNotBetween(params_notBetween1, params_notBetween2);
        }
        String methodName_null = TypeCast.getString(workItemMap.get("methodName_null"));
        String methodName_notNull = TypeCast.getString(workItemMap.get("methodName_notNull"));
        String methodName = TypeCast.getString(workItemMap.get("methodName"));
        String methodName_not = TypeCast.getString(workItemMap.get("methodName_not"));
        String methodName_greater = TypeCast.getString(workItemMap.get("methodName_greater"));
        String methodName_greaterEqual = TypeCast.getString(workItemMap.get("methodName_greaterEqual"));
        String methodName_less = TypeCast.getString(workItemMap.get("methodName_less"));
        String methodName_lessEqual = TypeCast.getString(workItemMap.get("methodName_lessEqual"));
        String methodName_like = TypeCast.getString(workItemMap.get("methodName_like"));
        String methodName_notLike = TypeCast.getString(workItemMap.get("methodName_notLike"));
        List<String> methodName_in = TypeCast.getStringList(workItemMap.get("methodName_in"));
        List<String> methodName_notIn = TypeCast.getStringList(workItemMap.get("methodName_notIn"));
        String methodName_between1 = TypeCast.getString(workItemMap.get("methodName_between1"));
        String methodName_between2 = TypeCast.getString(workItemMap.get("methodName_between2"));
        String methodName_notBetween1 = TypeCast.getString(workItemMap.get("methodName_notBetween1"));
        String methodName_notBetween2 = TypeCast.getString(workItemMap.get("methodName_notBetween2"));

        if (methodName_null != null) {
            c.andMethodNameIsNull();
        }
        if (methodName_notNull != null) {
            c.andMethodNameIsNotNull();
        }
        if (methodName != null) {
            c.andMethodNameEqualTo(methodName);
        }
        if (methodName_not != null) {
            c.andMethodNameNotEqualTo(methodName_not);
        }
        if (methodName_greater != null) {
            c.andMethodNameGreaterThan(methodName_greater);
        }
        if (methodName_greaterEqual != null) {
            c.andMethodNameGreaterThanOrEqualTo(methodName_greaterEqual);
        }
        if (methodName_less != null) {
            c.andMethodNameLessThan(methodName_less);
        }
        if (methodName_lessEqual != null) {
            c.andMethodNameLessThanOrEqualTo(methodName_lessEqual);
        }
        if (methodName_like != null) {
            c.andMethodNameLike(methodName_like);
        }
        if (methodName_notLike != null) {
            c.andMethodNameNotLike(methodName_notLike);
        }
        if (methodName_in != null) {
            c.andMethodNameIn(methodName_in);
        }
        if (methodName_notIn != null) {
            c.andMethodNameNotIn(methodName_notIn);
        }
        if (methodName_between1 != null) {
            c.andMethodNameBetween(methodName_between1, methodName_between2);
        }
        if (methodName_notBetween1 != null) {
            c.andMethodNameNotBetween(methodName_notBetween1, methodName_notBetween2);
        }
        String dbKeyFrom_null = TypeCast.getString(workItemMap.get("dbKeyFrom_null"));
        String dbKeyFrom_notNull = TypeCast.getString(workItemMap.get("dbKeyFrom_notNull"));
        String dbKeyFrom = TypeCast.getString(workItemMap.get("dbKeyFrom"));
        String dbKeyFrom_not = TypeCast.getString(workItemMap.get("dbKeyFrom_not"));
        String dbKeyFrom_greater = TypeCast.getString(workItemMap.get("dbKeyFrom_greater"));
        String dbKeyFrom_greaterEqual = TypeCast.getString(workItemMap.get("dbKeyFrom_greaterEqual"));
        String dbKeyFrom_less = TypeCast.getString(workItemMap.get("dbKeyFrom_less"));
        String dbKeyFrom_lessEqual = TypeCast.getString(workItemMap.get("dbKeyFrom_lessEqual"));
        String dbKeyFrom_like = TypeCast.getString(workItemMap.get("dbKeyFrom_like"));
        String dbKeyFrom_notLike = TypeCast.getString(workItemMap.get("dbKeyFrom_notLike"));
        List<String> dbKeyFrom_in = TypeCast.getStringList(workItemMap.get("dbKeyFrom_in"));
        List<String> dbKeyFrom_notIn = TypeCast.getStringList(workItemMap.get("dbKeyFrom_notIn"));
        String dbKeyFrom_between1 = TypeCast.getString(workItemMap.get("dbKeyFrom_between1"));
        String dbKeyFrom_between2 = TypeCast.getString(workItemMap.get("dbKeyFrom_between2"));
        String dbKeyFrom_notBetween1 = TypeCast.getString(workItemMap.get("dbKeyFrom_notBetween1"));
        String dbKeyFrom_notBetween2 = TypeCast.getString(workItemMap.get("dbKeyFrom_notBetween2"));

        if (dbKeyFrom_null != null) {
            c.andDbKeyFromIsNull();
        }
        if (dbKeyFrom_notNull != null) {
            c.andDbKeyFromIsNotNull();
        }
        if (dbKeyFrom != null) {
            c.andDbKeyFromEqualTo(dbKeyFrom);
        }
        if (dbKeyFrom_not != null) {
            c.andDbKeyFromNotEqualTo(dbKeyFrom_not);
        }
        if (dbKeyFrom_greater != null) {
            c.andDbKeyFromGreaterThan(dbKeyFrom_greater);
        }
        if (dbKeyFrom_greaterEqual != null) {
            c.andDbKeyFromGreaterThanOrEqualTo(dbKeyFrom_greaterEqual);
        }
        if (dbKeyFrom_less != null) {
            c.andDbKeyFromLessThan(dbKeyFrom_less);
        }
        if (dbKeyFrom_lessEqual != null) {
            c.andDbKeyFromLessThanOrEqualTo(dbKeyFrom_lessEqual);
        }
        if (dbKeyFrom_like != null) {
            c.andDbKeyFromLike(dbKeyFrom_like);
        }
        if (dbKeyFrom_notLike != null) {
            c.andDbKeyFromNotLike(dbKeyFrom_notLike);
        }
        if (dbKeyFrom_in != null) {
            c.andDbKeyFromIn(dbKeyFrom_in);
        }
        if (dbKeyFrom_notIn != null) {
            c.andDbKeyFromNotIn(dbKeyFrom_notIn);
        }
        if (dbKeyFrom_between1 != null) {
            c.andDbKeyFromBetween(dbKeyFrom_between1, dbKeyFrom_between2);
        }
        if (dbKeyFrom_notBetween1 != null) {
            c.andDbKeyFromNotBetween(dbKeyFrom_notBetween1, dbKeyFrom_notBetween2);
        }
        Integer readerType_null = TypeCast.getInteger(workItemMap.get("readerType_null"));
        Integer readerType_notNull = TypeCast.getInteger(workItemMap.get("readerType_notNull"));
        Integer readerType = TypeCast.getInteger(workItemMap.get("readerType"));
        Integer readerType_not = TypeCast.getInteger(workItemMap.get("readerType_not"));
        Integer readerType_greater = TypeCast.getInteger(workItemMap.get("readerType_greater"));
        Integer readerType_greaterEqual = TypeCast.getInteger(workItemMap.get("readerType_greaterEqual"));
        Integer readerType_less = TypeCast.getInteger(workItemMap.get("readerType_less"));
        Integer readerType_lessEqual = TypeCast.getInteger(workItemMap.get("readerType_lessEqual"));
        List<Integer> readerType_in = TypeCast.getIntegerList(workItemMap.get("readerType_in"));
        List<Integer> readerType_notIn = TypeCast.getIntegerList(workItemMap.get("readerType_notIn"));
        Integer readerType_between1 = TypeCast.getInteger(workItemMap.get("readerType_between1"));
        Integer readerType_between2 = TypeCast.getInteger(workItemMap.get("readerType_between2"));
        Integer readerType_notBetween1 = TypeCast.getInteger(workItemMap.get("readerType_notBetween1"));
        Integer readerType_notBetween2 = TypeCast.getInteger(workItemMap.get("readerType_notBetween2"));

        if (readerType_null != null) {
            c.andReaderTypeIsNull();
        }
        if (readerType_notNull != null) {
            c.andReaderTypeIsNotNull();
        }
        if (readerType != null) {
            c.andReaderTypeEqualTo(readerType);
        }
        if (readerType_not != null) {
            c.andReaderTypeNotEqualTo(readerType_not);
        }
        if (readerType_greater != null) {
            c.andReaderTypeGreaterThan(readerType_greater);
        }
        if (readerType_greaterEqual != null) {
            c.andReaderTypeGreaterThanOrEqualTo(readerType_greaterEqual);
        }
        if (readerType_less != null) {
            c.andReaderTypeLessThan(readerType_less);
        }
        if (readerType_lessEqual != null) {
            c.andReaderTypeLessThanOrEqualTo(readerType_lessEqual);
        }
        if (readerType_in != null) {
            c.andReaderTypeIn(readerType_in);
        }
        if (readerType_notIn != null) {
            c.andReaderTypeNotIn(readerType_notIn);
        }
        if (readerType_between1 != null) {
            c.andReaderTypeBetween(readerType_between1, readerType_between2);
        }
        if (readerType_notBetween1 != null) {
            c.andReaderTypeNotBetween(readerType_notBetween1, readerType_notBetween2);
        }
        String dbKeyTo_null = TypeCast.getString(workItemMap.get("dbKeyTo_null"));
        String dbKeyTo_notNull = TypeCast.getString(workItemMap.get("dbKeyTo_notNull"));
        String dbKeyTo = TypeCast.getString(workItemMap.get("dbKeyTo"));
        String dbKeyTo_not = TypeCast.getString(workItemMap.get("dbKeyTo_not"));
        String dbKeyTo_greater = TypeCast.getString(workItemMap.get("dbKeyTo_greater"));
        String dbKeyTo_greaterEqual = TypeCast.getString(workItemMap.get("dbKeyTo_greaterEqual"));
        String dbKeyTo_less = TypeCast.getString(workItemMap.get("dbKeyTo_less"));
        String dbKeyTo_lessEqual = TypeCast.getString(workItemMap.get("dbKeyTo_lessEqual"));
        String dbKeyTo_like = TypeCast.getString(workItemMap.get("dbKeyTo_like"));
        String dbKeyTo_notLike = TypeCast.getString(workItemMap.get("dbKeyTo_notLike"));
        List<String> dbKeyTo_in = TypeCast.getStringList(workItemMap.get("dbKeyTo_in"));
        List<String> dbKeyTo_notIn = TypeCast.getStringList(workItemMap.get("dbKeyTo_notIn"));
        String dbKeyTo_between1 = TypeCast.getString(workItemMap.get("dbKeyTo_between1"));
        String dbKeyTo_between2 = TypeCast.getString(workItemMap.get("dbKeyTo_between2"));
        String dbKeyTo_notBetween1 = TypeCast.getString(workItemMap.get("dbKeyTo_notBetween1"));
        String dbKeyTo_notBetween2 = TypeCast.getString(workItemMap.get("dbKeyTo_notBetween2"));

        if (dbKeyTo_null != null) {
            c.andDbKeyToIsNull();
        }
        if (dbKeyTo_notNull != null) {
            c.andDbKeyToIsNotNull();
        }
        if (dbKeyTo != null) {
            c.andDbKeyToEqualTo(dbKeyTo);
        }
        if (dbKeyTo_not != null) {
            c.andDbKeyToNotEqualTo(dbKeyTo_not);
        }
        if (dbKeyTo_greater != null) {
            c.andDbKeyToGreaterThan(dbKeyTo_greater);
        }
        if (dbKeyTo_greaterEqual != null) {
            c.andDbKeyToGreaterThanOrEqualTo(dbKeyTo_greaterEqual);
        }
        if (dbKeyTo_less != null) {
            c.andDbKeyToLessThan(dbKeyTo_less);
        }
        if (dbKeyTo_lessEqual != null) {
            c.andDbKeyToLessThanOrEqualTo(dbKeyTo_lessEqual);
        }
        if (dbKeyTo_like != null) {
            c.andDbKeyToLike(dbKeyTo_like);
        }
        if (dbKeyTo_notLike != null) {
            c.andDbKeyToNotLike(dbKeyTo_notLike);
        }
        if (dbKeyTo_in != null) {
            c.andDbKeyToIn(dbKeyTo_in);
        }
        if (dbKeyTo_notIn != null) {
            c.andDbKeyToNotIn(dbKeyTo_notIn);
        }
        if (dbKeyTo_between1 != null) {
            c.andDbKeyToBetween(dbKeyTo_between1, dbKeyTo_between2);
        }
        if (dbKeyTo_notBetween1 != null) {
            c.andDbKeyToNotBetween(dbKeyTo_notBetween1, dbKeyTo_notBetween2);
        }
        String tableFrom_null = TypeCast.getString(workItemMap.get("tableFrom_null"));
        String tableFrom_notNull = TypeCast.getString(workItemMap.get("tableFrom_notNull"));
        String tableFrom = TypeCast.getString(workItemMap.get("tableFrom"));
        String tableFrom_not = TypeCast.getString(workItemMap.get("tableFrom_not"));
        String tableFrom_greater = TypeCast.getString(workItemMap.get("tableFrom_greater"));
        String tableFrom_greaterEqual = TypeCast.getString(workItemMap.get("tableFrom_greaterEqual"));
        String tableFrom_less = TypeCast.getString(workItemMap.get("tableFrom_less"));
        String tableFrom_lessEqual = TypeCast.getString(workItemMap.get("tableFrom_lessEqual"));
        String tableFrom_like = TypeCast.getString(workItemMap.get("tableFrom_like"));
        String tableFrom_notLike = TypeCast.getString(workItemMap.get("tableFrom_notLike"));
        List<String> tableFrom_in = TypeCast.getStringList(workItemMap.get("tableFrom_in"));
        List<String> tableFrom_notIn = TypeCast.getStringList(workItemMap.get("tableFrom_notIn"));
        String tableFrom_between1 = TypeCast.getString(workItemMap.get("tableFrom_between1"));
        String tableFrom_between2 = TypeCast.getString(workItemMap.get("tableFrom_between2"));
        String tableFrom_notBetween1 = TypeCast.getString(workItemMap.get("tableFrom_notBetween1"));
        String tableFrom_notBetween2 = TypeCast.getString(workItemMap.get("tableFrom_notBetween2"));

        if (tableFrom_null != null) {
            c.andTableFromIsNull();
        }
        if (tableFrom_notNull != null) {
            c.andTableFromIsNotNull();
        }
        if (tableFrom != null) {
            c.andTableFromEqualTo(tableFrom);
        }
        if (tableFrom_not != null) {
            c.andTableFromNotEqualTo(tableFrom_not);
        }
        if (tableFrom_greater != null) {
            c.andTableFromGreaterThan(tableFrom_greater);
        }
        if (tableFrom_greaterEqual != null) {
            c.andTableFromGreaterThanOrEqualTo(tableFrom_greaterEqual);
        }
        if (tableFrom_less != null) {
            c.andTableFromLessThan(tableFrom_less);
        }
        if (tableFrom_lessEqual != null) {
            c.andTableFromLessThanOrEqualTo(tableFrom_lessEqual);
        }
        if (tableFrom_like != null) {
            c.andTableFromLike(tableFrom_like);
        }
        if (tableFrom_notLike != null) {
            c.andTableFromNotLike(tableFrom_notLike);
        }
        if (tableFrom_in != null) {
            c.andTableFromIn(tableFrom_in);
        }
        if (tableFrom_notIn != null) {
            c.andTableFromNotIn(tableFrom_notIn);
        }
        if (tableFrom_between1 != null) {
            c.andTableFromBetween(tableFrom_between1, tableFrom_between2);
        }
        if (tableFrom_notBetween1 != null) {
            c.andTableFromNotBetween(tableFrom_notBetween1, tableFrom_notBetween2);
        }
        String tableTo_null = TypeCast.getString(workItemMap.get("tableTo_null"));
        String tableTo_notNull = TypeCast.getString(workItemMap.get("tableTo_notNull"));
        String tableTo = TypeCast.getString(workItemMap.get("tableTo"));
        String tableTo_not = TypeCast.getString(workItemMap.get("tableTo_not"));
        String tableTo_greater = TypeCast.getString(workItemMap.get("tableTo_greater"));
        String tableTo_greaterEqual = TypeCast.getString(workItemMap.get("tableTo_greaterEqual"));
        String tableTo_less = TypeCast.getString(workItemMap.get("tableTo_less"));
        String tableTo_lessEqual = TypeCast.getString(workItemMap.get("tableTo_lessEqual"));
        String tableTo_like = TypeCast.getString(workItemMap.get("tableTo_like"));
        String tableTo_notLike = TypeCast.getString(workItemMap.get("tableTo_notLike"));
        List<String> tableTo_in = TypeCast.getStringList(workItemMap.get("tableTo_in"));
        List<String> tableTo_notIn = TypeCast.getStringList(workItemMap.get("tableTo_notIn"));
        String tableTo_between1 = TypeCast.getString(workItemMap.get("tableTo_between1"));
        String tableTo_between2 = TypeCast.getString(workItemMap.get("tableTo_between2"));
        String tableTo_notBetween1 = TypeCast.getString(workItemMap.get("tableTo_notBetween1"));
        String tableTo_notBetween2 = TypeCast.getString(workItemMap.get("tableTo_notBetween2"));

        if (tableTo_null != null) {
            c.andTableToIsNull();
        }
        if (tableTo_notNull != null) {
            c.andTableToIsNotNull();
        }
        if (tableTo != null) {
            c.andTableToEqualTo(tableTo);
        }
        if (tableTo_not != null) {
            c.andTableToNotEqualTo(tableTo_not);
        }
        if (tableTo_greater != null) {
            c.andTableToGreaterThan(tableTo_greater);
        }
        if (tableTo_greaterEqual != null) {
            c.andTableToGreaterThanOrEqualTo(tableTo_greaterEqual);
        }
        if (tableTo_less != null) {
            c.andTableToLessThan(tableTo_less);
        }
        if (tableTo_lessEqual != null) {
            c.andTableToLessThanOrEqualTo(tableTo_lessEqual);
        }
        if (tableTo_like != null) {
            c.andTableToLike(tableTo_like);
        }
        if (tableTo_notLike != null) {
            c.andTableToNotLike(tableTo_notLike);
        }
        if (tableTo_in != null) {
            c.andTableToIn(tableTo_in);
        }
        if (tableTo_notIn != null) {
            c.andTableToNotIn(tableTo_notIn);
        }
        if (tableTo_between1 != null) {
            c.andTableToBetween(tableTo_between1, tableTo_between2);
        }
        if (tableTo_notBetween1 != null) {
            c.andTableToNotBetween(tableTo_notBetween1, tableTo_notBetween2);
        }
        String selectSql_null = TypeCast.getString(workItemMap.get("selectSql_null"));
        String selectSql_notNull = TypeCast.getString(workItemMap.get("selectSql_notNull"));
        String selectSql = TypeCast.getString(workItemMap.get("selectSql"));
        String selectSql_not = TypeCast.getString(workItemMap.get("selectSql_not"));
        String selectSql_greater = TypeCast.getString(workItemMap.get("selectSql_greater"));
        String selectSql_greaterEqual = TypeCast.getString(workItemMap.get("selectSql_greaterEqual"));
        String selectSql_less = TypeCast.getString(workItemMap.get("selectSql_less"));
        String selectSql_lessEqual = TypeCast.getString(workItemMap.get("selectSql_lessEqual"));
        String selectSql_like = TypeCast.getString(workItemMap.get("selectSql_like"));
        String selectSql_notLike = TypeCast.getString(workItemMap.get("selectSql_notLike"));
        List<String> selectSql_in = TypeCast.getStringList(workItemMap.get("selectSql_in"));
        List<String> selectSql_notIn = TypeCast.getStringList(workItemMap.get("selectSql_notIn"));
        String selectSql_between1 = TypeCast.getString(workItemMap.get("selectSql_between1"));
        String selectSql_between2 = TypeCast.getString(workItemMap.get("selectSql_between2"));
        String selectSql_notBetween1 = TypeCast.getString(workItemMap.get("selectSql_notBetween1"));
        String selectSql_notBetween2 = TypeCast.getString(workItemMap.get("selectSql_notBetween2"));

        if (selectSql_null != null) {
            c.andSelectSqlIsNull();
        }
        if (selectSql_notNull != null) {
            c.andSelectSqlIsNotNull();
        }
        if (selectSql != null) {
            c.andSelectSqlEqualTo(selectSql);
        }
        if (selectSql_not != null) {
            c.andSelectSqlNotEqualTo(selectSql_not);
        }
        if (selectSql_greater != null) {
            c.andSelectSqlGreaterThan(selectSql_greater);
        }
        if (selectSql_greaterEqual != null) {
            c.andSelectSqlGreaterThanOrEqualTo(selectSql_greaterEqual);
        }
        if (selectSql_less != null) {
            c.andSelectSqlLessThan(selectSql_less);
        }
        if (selectSql_lessEqual != null) {
            c.andSelectSqlLessThanOrEqualTo(selectSql_lessEqual);
        }
        if (selectSql_like != null) {
            c.andSelectSqlLike(selectSql_like);
        }
        if (selectSql_notLike != null) {
            c.andSelectSqlNotLike(selectSql_notLike);
        }
        if (selectSql_in != null) {
            c.andSelectSqlIn(selectSql_in);
        }
        if (selectSql_notIn != null) {
            c.andSelectSqlNotIn(selectSql_notIn);
        }
        if (selectSql_between1 != null) {
            c.andSelectSqlBetween(selectSql_between1, selectSql_between2);
        }
        if (selectSql_notBetween1 != null) {
            c.andSelectSqlNotBetween(selectSql_notBetween1, selectSql_notBetween2);
        }
        String insertSql_null = TypeCast.getString(workItemMap.get("insertSql_null"));
        String insertSql_notNull = TypeCast.getString(workItemMap.get("insertSql_notNull"));
        String insertSql = TypeCast.getString(workItemMap.get("insertSql"));
        String insertSql_not = TypeCast.getString(workItemMap.get("insertSql_not"));
        String insertSql_greater = TypeCast.getString(workItemMap.get("insertSql_greater"));
        String insertSql_greaterEqual = TypeCast.getString(workItemMap.get("insertSql_greaterEqual"));
        String insertSql_less = TypeCast.getString(workItemMap.get("insertSql_less"));
        String insertSql_lessEqual = TypeCast.getString(workItemMap.get("insertSql_lessEqual"));
        String insertSql_like = TypeCast.getString(workItemMap.get("insertSql_like"));
        String insertSql_notLike = TypeCast.getString(workItemMap.get("insertSql_notLike"));
        List<String> insertSql_in = TypeCast.getStringList(workItemMap.get("insertSql_in"));
        List<String> insertSql_notIn = TypeCast.getStringList(workItemMap.get("insertSql_notIn"));
        String insertSql_between1 = TypeCast.getString(workItemMap.get("insertSql_between1"));
        String insertSql_between2 = TypeCast.getString(workItemMap.get("insertSql_between2"));
        String insertSql_notBetween1 = TypeCast.getString(workItemMap.get("insertSql_notBetween1"));
        String insertSql_notBetween2 = TypeCast.getString(workItemMap.get("insertSql_notBetween2"));

        if (insertSql_null != null) {
            c.andInsertSqlIsNull();
        }
        if (insertSql_notNull != null) {
            c.andInsertSqlIsNotNull();
        }
        if (insertSql != null) {
            c.andInsertSqlEqualTo(insertSql);
        }
        if (insertSql_not != null) {
            c.andInsertSqlNotEqualTo(insertSql_not);
        }
        if (insertSql_greater != null) {
            c.andInsertSqlGreaterThan(insertSql_greater);
        }
        if (insertSql_greaterEqual != null) {
            c.andInsertSqlGreaterThanOrEqualTo(insertSql_greaterEqual);
        }
        if (insertSql_less != null) {
            c.andInsertSqlLessThan(insertSql_less);
        }
        if (insertSql_lessEqual != null) {
            c.andInsertSqlLessThanOrEqualTo(insertSql_lessEqual);
        }
        if (insertSql_like != null) {
            c.andInsertSqlLike(insertSql_like);
        }
        if (insertSql_notLike != null) {
            c.andInsertSqlNotLike(insertSql_notLike);
        }
        if (insertSql_in != null) {
            c.andInsertSqlIn(insertSql_in);
        }
        if (insertSql_notIn != null) {
            c.andInsertSqlNotIn(insertSql_notIn);
        }
        if (insertSql_between1 != null) {
            c.andInsertSqlBetween(insertSql_between1, insertSql_between2);
        }
        if (insertSql_notBetween1 != null) {
            c.andInsertSqlNotBetween(insertSql_notBetween1, insertSql_notBetween2);
        }
        String deleteSql_null = TypeCast.getString(workItemMap.get("deleteSql_null"));
        String deleteSql_notNull = TypeCast.getString(workItemMap.get("deleteSql_notNull"));
        String deleteSql = TypeCast.getString(workItemMap.get("deleteSql"));
        String deleteSql_not = TypeCast.getString(workItemMap.get("deleteSql_not"));
        String deleteSql_greater = TypeCast.getString(workItemMap.get("deleteSql_greater"));
        String deleteSql_greaterEqual = TypeCast.getString(workItemMap.get("deleteSql_greaterEqual"));
        String deleteSql_less = TypeCast.getString(workItemMap.get("deleteSql_less"));
        String deleteSql_lessEqual = TypeCast.getString(workItemMap.get("deleteSql_lessEqual"));
        String deleteSql_like = TypeCast.getString(workItemMap.get("deleteSql_like"));
        String deleteSql_notLike = TypeCast.getString(workItemMap.get("deleteSql_notLike"));
        List<String> deleteSql_in = TypeCast.getStringList(workItemMap.get("deleteSql_in"));
        List<String> deleteSql_notIn = TypeCast.getStringList(workItemMap.get("deleteSql_notIn"));
        String deleteSql_between1 = TypeCast.getString(workItemMap.get("deleteSql_between1"));
        String deleteSql_between2 = TypeCast.getString(workItemMap.get("deleteSql_between2"));
        String deleteSql_notBetween1 = TypeCast.getString(workItemMap.get("deleteSql_notBetween1"));
        String deleteSql_notBetween2 = TypeCast.getString(workItemMap.get("deleteSql_notBetween2"));

        if (deleteSql_null != null) {
            c.andDeleteSqlIsNull();
        }
        if (deleteSql_notNull != null) {
            c.andDeleteSqlIsNotNull();
        }
        if (deleteSql != null) {
            c.andDeleteSqlEqualTo(deleteSql);
        }
        if (deleteSql_not != null) {
            c.andDeleteSqlNotEqualTo(deleteSql_not);
        }
        if (deleteSql_greater != null) {
            c.andDeleteSqlGreaterThan(deleteSql_greater);
        }
        if (deleteSql_greaterEqual != null) {
            c.andDeleteSqlGreaterThanOrEqualTo(deleteSql_greaterEqual);
        }
        if (deleteSql_less != null) {
            c.andDeleteSqlLessThan(deleteSql_less);
        }
        if (deleteSql_lessEqual != null) {
            c.andDeleteSqlLessThanOrEqualTo(deleteSql_lessEqual);
        }
        if (deleteSql_like != null) {
            c.andDeleteSqlLike(deleteSql_like);
        }
        if (deleteSql_notLike != null) {
            c.andDeleteSqlNotLike(deleteSql_notLike);
        }
        if (deleteSql_in != null) {
            c.andDeleteSqlIn(deleteSql_in);
        }
        if (deleteSql_notIn != null) {
            c.andDeleteSqlNotIn(deleteSql_notIn);
        }
        if (deleteSql_between1 != null) {
            c.andDeleteSqlBetween(deleteSql_between1, deleteSql_between2);
        }
        if (deleteSql_notBetween1 != null) {
            c.andDeleteSqlNotBetween(deleteSql_notBetween1, deleteSql_notBetween2);
        }
        String whereSql_null = TypeCast.getString(workItemMap.get("whereSql_null"));
        String whereSql_notNull = TypeCast.getString(workItemMap.get("whereSql_notNull"));
        String whereSql = TypeCast.getString(workItemMap.get("whereSql"));
        String whereSql_not = TypeCast.getString(workItemMap.get("whereSql_not"));
        String whereSql_greater = TypeCast.getString(workItemMap.get("whereSql_greater"));
        String whereSql_greaterEqual = TypeCast.getString(workItemMap.get("whereSql_greaterEqual"));
        String whereSql_less = TypeCast.getString(workItemMap.get("whereSql_less"));
        String whereSql_lessEqual = TypeCast.getString(workItemMap.get("whereSql_lessEqual"));
        String whereSql_like = TypeCast.getString(workItemMap.get("whereSql_like"));
        String whereSql_notLike = TypeCast.getString(workItemMap.get("whereSql_notLike"));
        List<String> whereSql_in = TypeCast.getStringList(workItemMap.get("whereSql_in"));
        List<String> whereSql_notIn = TypeCast.getStringList(workItemMap.get("whereSql_notIn"));
        String whereSql_between1 = TypeCast.getString(workItemMap.get("whereSql_between1"));
        String whereSql_between2 = TypeCast.getString(workItemMap.get("whereSql_between2"));
        String whereSql_notBetween1 = TypeCast.getString(workItemMap.get("whereSql_notBetween1"));
        String whereSql_notBetween2 = TypeCast.getString(workItemMap.get("whereSql_notBetween2"));

        if (whereSql_null != null) {
            c.andWhereSqlIsNull();
        }
        if (whereSql_notNull != null) {
            c.andWhereSqlIsNotNull();
        }
        if (whereSql != null) {
            c.andWhereSqlEqualTo(whereSql);
        }
        if (whereSql_not != null) {
            c.andWhereSqlNotEqualTo(whereSql_not);
        }
        if (whereSql_greater != null) {
            c.andWhereSqlGreaterThan(whereSql_greater);
        }
        if (whereSql_greaterEqual != null) {
            c.andWhereSqlGreaterThanOrEqualTo(whereSql_greaterEqual);
        }
        if (whereSql_less != null) {
            c.andWhereSqlLessThan(whereSql_less);
        }
        if (whereSql_lessEqual != null) {
            c.andWhereSqlLessThanOrEqualTo(whereSql_lessEqual);
        }
        if (whereSql_like != null) {
            c.andWhereSqlLike(whereSql_like);
        }
        if (whereSql_notLike != null) {
            c.andWhereSqlNotLike(whereSql_notLike);
        }
        if (whereSql_in != null) {
            c.andWhereSqlIn(whereSql_in);
        }
        if (whereSql_notIn != null) {
            c.andWhereSqlNotIn(whereSql_notIn);
        }
        if (whereSql_between1 != null) {
            c.andWhereSqlBetween(whereSql_between1, whereSql_between2);
        }
        if (whereSql_notBetween1 != null) {
            c.andWhereSqlNotBetween(whereSql_notBetween1, whereSql_notBetween2);
        }
        String processBean_null = TypeCast.getString(workItemMap.get("processBean_null"));
        String processBean_notNull = TypeCast.getString(workItemMap.get("processBean_notNull"));
        String processBean = TypeCast.getString(workItemMap.get("processBean"));
        String processBean_not = TypeCast.getString(workItemMap.get("processBean_not"));
        String processBean_greater = TypeCast.getString(workItemMap.get("processBean_greater"));
        String processBean_greaterEqual = TypeCast.getString(workItemMap.get("processBean_greaterEqual"));
        String processBean_less = TypeCast.getString(workItemMap.get("processBean_less"));
        String processBean_lessEqual = TypeCast.getString(workItemMap.get("processBean_lessEqual"));
        String processBean_like = TypeCast.getString(workItemMap.get("processBean_like"));
        String processBean_notLike = TypeCast.getString(workItemMap.get("processBean_notLike"));
        List<String> processBean_in = TypeCast.getStringList(workItemMap.get("processBean_in"));
        List<String> processBean_notIn = TypeCast.getStringList(workItemMap.get("processBean_notIn"));
        String processBean_between1 = TypeCast.getString(workItemMap.get("processBean_between1"));
        String processBean_between2 = TypeCast.getString(workItemMap.get("processBean_between2"));
        String processBean_notBetween1 = TypeCast.getString(workItemMap.get("processBean_notBetween1"));
        String processBean_notBetween2 = TypeCast.getString(workItemMap.get("processBean_notBetween2"));

        if (processBean_null != null) {
            c.andProcessBeanIsNull();
        }
        if (processBean_notNull != null) {
            c.andProcessBeanIsNotNull();
        }
        if (processBean != null) {
            c.andProcessBeanEqualTo(processBean);
        }
        if (processBean_not != null) {
            c.andProcessBeanNotEqualTo(processBean_not);
        }
        if (processBean_greater != null) {
            c.andProcessBeanGreaterThan(processBean_greater);
        }
        if (processBean_greaterEqual != null) {
            c.andProcessBeanGreaterThanOrEqualTo(processBean_greaterEqual);
        }
        if (processBean_less != null) {
            c.andProcessBeanLessThan(processBean_less);
        }
        if (processBean_lessEqual != null) {
            c.andProcessBeanLessThanOrEqualTo(processBean_lessEqual);
        }
        if (processBean_like != null) {
            c.andProcessBeanLike(processBean_like);
        }
        if (processBean_notLike != null) {
            c.andProcessBeanNotLike(processBean_notLike);
        }
        if (processBean_in != null) {
            c.andProcessBeanIn(processBean_in);
        }
        if (processBean_notIn != null) {
            c.andProcessBeanNotIn(processBean_notIn);
        }
        if (processBean_between1 != null) {
            c.andProcessBeanBetween(processBean_between1, processBean_between2);
        }
        if (processBean_notBetween1 != null) {
            c.andProcessBeanNotBetween(processBean_notBetween1, processBean_notBetween2);
        }
        String processClassType_null = TypeCast.getString(workItemMap.get("processClassType_null"));
        String processClassType_notNull = TypeCast.getString(workItemMap.get("processClassType_notNull"));
        String processClassType = TypeCast.getString(workItemMap.get("processClassType"));
        String processClassType_not = TypeCast.getString(workItemMap.get("processClassType_not"));
        String processClassType_greater = TypeCast.getString(workItemMap.get("processClassType_greater"));
        String processClassType_greaterEqual = TypeCast.getString(workItemMap.get("processClassType_greaterEqual"));
        String processClassType_less = TypeCast.getString(workItemMap.get("processClassType_less"));
        String processClassType_lessEqual = TypeCast.getString(workItemMap.get("processClassType_lessEqual"));
        String processClassType_like = TypeCast.getString(workItemMap.get("processClassType_like"));
        String processClassType_notLike = TypeCast.getString(workItemMap.get("processClassType_notLike"));
        List<String> processClassType_in = TypeCast.getStringList(workItemMap.get("processClassType_in"));
        List<String> processClassType_notIn = TypeCast.getStringList(workItemMap.get("processClassType_notIn"));
        String processClassType_between1 = TypeCast.getString(workItemMap.get("processClassType_between1"));
        String processClassType_between2 = TypeCast.getString(workItemMap.get("processClassType_between2"));
        String processClassType_notBetween1 = TypeCast.getString(workItemMap.get("processClassType_notBetween1"));
        String processClassType_notBetween2 = TypeCast.getString(workItemMap.get("processClassType_notBetween2"));

        if (processClassType_null != null) {
            c.andProcessClassTypeIsNull();
        }
        if (processClassType_notNull != null) {
            c.andProcessClassTypeIsNotNull();
        }
        if (processClassType != null) {
            c.andProcessClassTypeEqualTo(processClassType);
        }
        if (processClassType_not != null) {
            c.andProcessClassTypeNotEqualTo(processClassType_not);
        }
        if (processClassType_greater != null) {
            c.andProcessClassTypeGreaterThan(processClassType_greater);
        }
        if (processClassType_greaterEqual != null) {
            c.andProcessClassTypeGreaterThanOrEqualTo(processClassType_greaterEqual);
        }
        if (processClassType_less != null) {
            c.andProcessClassTypeLessThan(processClassType_less);
        }
        if (processClassType_lessEqual != null) {
            c.andProcessClassTypeLessThanOrEqualTo(processClassType_lessEqual);
        }
        if (processClassType_like != null) {
            c.andProcessClassTypeLike(processClassType_like);
        }
        if (processClassType_notLike != null) {
            c.andProcessClassTypeNotLike(processClassType_notLike);
        }
        if (processClassType_in != null) {
            c.andProcessClassTypeIn(processClassType_in);
        }
        if (processClassType_notIn != null) {
            c.andProcessClassTypeNotIn(processClassType_notIn);
        }
        if (processClassType_between1 != null) {
            c.andProcessClassTypeBetween(processClassType_between1, processClassType_between2);
        }
        if (processClassType_notBetween1 != null) {
            c.andProcessClassTypeNotBetween(processClassType_notBetween1, processClassType_notBetween2);
        }
        String processClass_null = TypeCast.getString(workItemMap.get("processClass_null"));
        String processClass_notNull = TypeCast.getString(workItemMap.get("processClass_notNull"));
        String processClass = TypeCast.getString(workItemMap.get("processClass"));
        String processClass_not = TypeCast.getString(workItemMap.get("processClass_not"));
        String processClass_greater = TypeCast.getString(workItemMap.get("processClass_greater"));
        String processClass_greaterEqual = TypeCast.getString(workItemMap.get("processClass_greaterEqual"));
        String processClass_less = TypeCast.getString(workItemMap.get("processClass_less"));
        String processClass_lessEqual = TypeCast.getString(workItemMap.get("processClass_lessEqual"));
        String processClass_like = TypeCast.getString(workItemMap.get("processClass_like"));
        String processClass_notLike = TypeCast.getString(workItemMap.get("processClass_notLike"));
        List<String> processClass_in = TypeCast.getStringList(workItemMap.get("processClass_in"));
        List<String> processClass_notIn = TypeCast.getStringList(workItemMap.get("processClass_notIn"));
        String processClass_between1 = TypeCast.getString(workItemMap.get("processClass_between1"));
        String processClass_between2 = TypeCast.getString(workItemMap.get("processClass_between2"));
        String processClass_notBetween1 = TypeCast.getString(workItemMap.get("processClass_notBetween1"));
        String processClass_notBetween2 = TypeCast.getString(workItemMap.get("processClass_notBetween2"));

        if (processClass_null != null) {
            c.andProcessClassIsNull();
        }
        if (processClass_notNull != null) {
            c.andProcessClassIsNotNull();
        }
        if (processClass != null) {
            c.andProcessClassEqualTo(processClass);
        }
        if (processClass_not != null) {
            c.andProcessClassNotEqualTo(processClass_not);
        }
        if (processClass_greater != null) {
            c.andProcessClassGreaterThan(processClass_greater);
        }
        if (processClass_greaterEqual != null) {
            c.andProcessClassGreaterThanOrEqualTo(processClass_greaterEqual);
        }
        if (processClass_less != null) {
            c.andProcessClassLessThan(processClass_less);
        }
        if (processClass_lessEqual != null) {
            c.andProcessClassLessThanOrEqualTo(processClass_lessEqual);
        }
        if (processClass_like != null) {
            c.andProcessClassLike(processClass_like);
        }
        if (processClass_notLike != null) {
            c.andProcessClassNotLike(processClass_notLike);
        }
        if (processClass_in != null) {
            c.andProcessClassIn(processClass_in);
        }
        if (processClass_notIn != null) {
            c.andProcessClassNotIn(processClass_notIn);
        }
        if (processClass_between1 != null) {
            c.andProcessClassBetween(processClass_between1, processClass_between2);
        }
        if (processClass_notBetween1 != null) {
            c.andProcessClassNotBetween(processClass_notBetween1, processClass_notBetween2);
        }
        Integer chunk_null = TypeCast.getInteger(workItemMap.get("chunk_null"));
        Integer chunk_notNull = TypeCast.getInteger(workItemMap.get("chunk_notNull"));
        Integer chunk = TypeCast.getInteger(workItemMap.get("chunk"));
        Integer chunk_not = TypeCast.getInteger(workItemMap.get("chunk_not"));
        Integer chunk_greater = TypeCast.getInteger(workItemMap.get("chunk_greater"));
        Integer chunk_greaterEqual = TypeCast.getInteger(workItemMap.get("chunk_greaterEqual"));
        Integer chunk_less = TypeCast.getInteger(workItemMap.get("chunk_less"));
        Integer chunk_lessEqual = TypeCast.getInteger(workItemMap.get("chunk_lessEqual"));
        List<Integer> chunk_in = TypeCast.getIntegerList(workItemMap.get("chunk_in"));
        List<Integer> chunk_notIn = TypeCast.getIntegerList(workItemMap.get("chunk_notIn"));
        Integer chunk_between1 = TypeCast.getInteger(workItemMap.get("chunk_between1"));
        Integer chunk_between2 = TypeCast.getInteger(workItemMap.get("chunk_between2"));
        Integer chunk_notBetween1 = TypeCast.getInteger(workItemMap.get("chunk_notBetween1"));
        Integer chunk_notBetween2 = TypeCast.getInteger(workItemMap.get("chunk_notBetween2"));

        if (chunk_null != null) {
            c.andChunkIsNull();
        }
        if (chunk_notNull != null) {
            c.andChunkIsNotNull();
        }
        if (chunk != null) {
            c.andChunkEqualTo(chunk);
        }
        if (chunk_not != null) {
            c.andChunkNotEqualTo(chunk_not);
        }
        if (chunk_greater != null) {
            c.andChunkGreaterThan(chunk_greater);
        }
        if (chunk_greaterEqual != null) {
            c.andChunkGreaterThanOrEqualTo(chunk_greaterEqual);
        }
        if (chunk_less != null) {
            c.andChunkLessThan(chunk_less);
        }
        if (chunk_lessEqual != null) {
            c.andChunkLessThanOrEqualTo(chunk_lessEqual);
        }
        if (chunk_in != null) {
            c.andChunkIn(chunk_in);
        }
        if (chunk_notIn != null) {
            c.andChunkNotIn(chunk_notIn);
        }
        if (chunk_between1 != null) {
            c.andChunkBetween(chunk_between1, chunk_between2);
        }
        if (chunk_notBetween1 != null) {
            c.andChunkNotBetween(chunk_notBetween1, chunk_notBetween2);
        }
        Integer execNum_null = TypeCast.getInteger(workItemMap.get("execNum_null"));
        Integer execNum_notNull = TypeCast.getInteger(workItemMap.get("execNum_notNull"));
        Integer execNum = TypeCast.getInteger(workItemMap.get("execNum"));
        Integer execNum_not = TypeCast.getInteger(workItemMap.get("execNum_not"));
        Integer execNum_greater = TypeCast.getInteger(workItemMap.get("execNum_greater"));
        Integer execNum_greaterEqual = TypeCast.getInteger(workItemMap.get("execNum_greaterEqual"));
        Integer execNum_less = TypeCast.getInteger(workItemMap.get("execNum_less"));
        Integer execNum_lessEqual = TypeCast.getInteger(workItemMap.get("execNum_lessEqual"));
        List<Integer> execNum_in = TypeCast.getIntegerList(workItemMap.get("execNum_in"));
        List<Integer> execNum_notIn = TypeCast.getIntegerList(workItemMap.get("execNum_notIn"));
        Integer execNum_between1 = TypeCast.getInteger(workItemMap.get("execNum_between1"));
        Integer execNum_between2 = TypeCast.getInteger(workItemMap.get("execNum_between2"));
        Integer execNum_notBetween1 = TypeCast.getInteger(workItemMap.get("execNum_notBetween1"));
        Integer execNum_notBetween2 = TypeCast.getInteger(workItemMap.get("execNum_notBetween2"));

        if (execNum_null != null) {
            c.andExecNumIsNull();
        }
        if (execNum_notNull != null) {
            c.andExecNumIsNotNull();
        }
        if (execNum != null) {
            c.andExecNumEqualTo(execNum);
        }
        if (execNum_not != null) {
            c.andExecNumNotEqualTo(execNum_not);
        }
        if (execNum_greater != null) {
            c.andExecNumGreaterThan(execNum_greater);
        }
        if (execNum_greaterEqual != null) {
            c.andExecNumGreaterThanOrEqualTo(execNum_greaterEqual);
        }
        if (execNum_less != null) {
            c.andExecNumLessThan(execNum_less);
        }
        if (execNum_lessEqual != null) {
            c.andExecNumLessThanOrEqualTo(execNum_lessEqual);
        }
        if (execNum_in != null) {
            c.andExecNumIn(execNum_in);
        }
        if (execNum_notIn != null) {
            c.andExecNumNotIn(execNum_notIn);
        }
        if (execNum_between1 != null) {
            c.andExecNumBetween(execNum_between1, execNum_between2);
        }
        if (execNum_notBetween1 != null) {
            c.andExecNumNotBetween(execNum_notBetween1, execNum_notBetween2);
        }
        Date createTime_null = TypeCast.getDate(workItemMap.get("createTime_null"));
        Date createTime_notNull = TypeCast.getDate(workItemMap.get("createTime_notNull"));
        Date createTime = TypeCast.getDate(workItemMap.get("createTime"));
        Date createTime_not = TypeCast.getDate(workItemMap.get("createTime_not"));
        Date createTime_greater = TypeCast.getDate(workItemMap.get("createTime_greater"));
        Date createTime_greaterEqual = TypeCast.getDate(workItemMap.get("createTime_greaterEqual"));
        Date createTime_less = TypeCast.getDate(workItemMap.get("createTime_less"));
        Date createTime_lessEqual = TypeCast.getDate(workItemMap.get("createTime_lessEqual"));
        List<Date> createTime_in = TypeCast.getDateList(workItemMap.get("createTime_in"));
        List<Date> createTime_notIn = TypeCast.getDateList(workItemMap.get("createTime_notIn"));
        Date createTime_between1 = TypeCast.getDate(workItemMap.get("createTime_between1"));
        Date createTime_between2 = TypeCast.getDate(workItemMap.get("createTime_between2"));
        Date createTime_notBetween1 = TypeCast.getDate(workItemMap.get("createTime_notBetween1"));
        Date createTime_notBetween2 = TypeCast.getDate(workItemMap.get("createTime_notBetween2"));

        if (createTime_null != null) {
            c.andCreateTimeIsNull();
        }
        if (createTime_notNull != null) {
            c.andCreateTimeIsNotNull();
        }
        if (createTime != null) {
            c.andCreateTimeEqualTo(createTime);
        }
        if (createTime_not != null) {
            c.andCreateTimeNotEqualTo(createTime_not);
        }
        if (createTime_greater != null) {
            c.andCreateTimeGreaterThan(createTime_greater);
        }
        if (createTime_greaterEqual != null) {
            c.andCreateTimeGreaterThanOrEqualTo(createTime_greaterEqual);
        }
        if (createTime_less != null) {
            c.andCreateTimeLessThan(createTime_less);
        }
        if (createTime_lessEqual != null) {
            c.andCreateTimeLessThanOrEqualTo(createTime_lessEqual);
        }
        if (createTime_in != null) {
            c.andCreateTimeIn(createTime_in);
        }
        if (createTime_notIn != null) {
            c.andCreateTimeNotIn(createTime_notIn);
        }
        if (createTime_between1 != null) {
            c.andCreateTimeBetween(createTime_between1, createTime_between2);
        }
        if (createTime_notBetween1 != null) {
            c.andCreateTimeNotBetween(createTime_notBetween1, createTime_notBetween2);
        }
        Date updateTime_null = TypeCast.getDate(workItemMap.get("updateTime_null"));
        Date updateTime_notNull = TypeCast.getDate(workItemMap.get("updateTime_notNull"));
        Date updateTime = TypeCast.getDate(workItemMap.get("updateTime"));
        Date updateTime_not = TypeCast.getDate(workItemMap.get("updateTime_not"));
        Date updateTime_greater = TypeCast.getDate(workItemMap.get("updateTime_greater"));
        Date updateTime_greaterEqual = TypeCast.getDate(workItemMap.get("updateTime_greaterEqual"));
        Date updateTime_less = TypeCast.getDate(workItemMap.get("updateTime_less"));
        Date updateTime_lessEqual = TypeCast.getDate(workItemMap.get("updateTime_lessEqual"));
        List<Date> updateTime_in = TypeCast.getDateList(workItemMap.get("updateTime_in"));
        List<Date> updateTime_notIn = TypeCast.getDateList(workItemMap.get("updateTime_notIn"));
        Date updateTime_between1 = TypeCast.getDate(workItemMap.get("updateTime_between1"));
        Date updateTime_between2 = TypeCast.getDate(workItemMap.get("updateTime_between2"));
        Date updateTime_notBetween1 = TypeCast.getDate(workItemMap.get("updateTime_notBetween1"));
        Date updateTime_notBetween2 = TypeCast.getDate(workItemMap.get("updateTime_notBetween2"));

        if (updateTime_null != null) {
            c.andUpdateTimeIsNull();
        }
        if (updateTime_notNull != null) {
            c.andUpdateTimeIsNotNull();
        }
        if (updateTime != null) {
            c.andUpdateTimeEqualTo(updateTime);
        }
        if (updateTime_not != null) {
            c.andUpdateTimeNotEqualTo(updateTime_not);
        }
        if (updateTime_greater != null) {
            c.andUpdateTimeGreaterThan(updateTime_greater);
        }
        if (updateTime_greaterEqual != null) {
            c.andUpdateTimeGreaterThanOrEqualTo(updateTime_greaterEqual);
        }
        if (updateTime_less != null) {
            c.andUpdateTimeLessThan(updateTime_less);
        }
        if (updateTime_lessEqual != null) {
            c.andUpdateTimeLessThanOrEqualTo(updateTime_lessEqual);
        }
        if (updateTime_in != null) {
            c.andUpdateTimeIn(updateTime_in);
        }
        if (updateTime_notIn != null) {
            c.andUpdateTimeNotIn(updateTime_notIn);
        }
        if (updateTime_between1 != null) {
            c.andUpdateTimeBetween(updateTime_between1, updateTime_between2);
        }
        if (updateTime_notBetween1 != null) {
            c.andUpdateTimeNotBetween(updateTime_notBetween1, updateTime_notBetween2);
        }
        String selectOne_null = TypeCast.getString(workItemMap.get("selectOne_null"));
        String selectOne_notNull = TypeCast.getString(workItemMap.get("selectOne_notNull"));
        String selectOne = TypeCast.getString(workItemMap.get("selectOne"));
        String selectOne_not = TypeCast.getString(workItemMap.get("selectOne_not"));
        String selectOne_greater = TypeCast.getString(workItemMap.get("selectOne_greater"));
        String selectOne_greaterEqual = TypeCast.getString(workItemMap.get("selectOne_greaterEqual"));
        String selectOne_less = TypeCast.getString(workItemMap.get("selectOne_less"));
        String selectOne_lessEqual = TypeCast.getString(workItemMap.get("selectOne_lessEqual"));
        String selectOne_like = TypeCast.getString(workItemMap.get("selectOne_like"));
        String selectOne_notLike = TypeCast.getString(workItemMap.get("selectOne_notLike"));
        List<String> selectOne_in = TypeCast.getStringList(workItemMap.get("selectOne_in"));
        List<String> selectOne_notIn = TypeCast.getStringList(workItemMap.get("selectOne_notIn"));
        String selectOne_between1 = TypeCast.getString(workItemMap.get("selectOne_between1"));
        String selectOne_between2 = TypeCast.getString(workItemMap.get("selectOne_between2"));
        String selectOne_notBetween1 = TypeCast.getString(workItemMap.get("selectOne_notBetween1"));
        String selectOne_notBetween2 = TypeCast.getString(workItemMap.get("selectOne_notBetween2"));

        if (selectOne_null != null) {
            c.andSelectOneIsNull();
        }
        if (selectOne_notNull != null) {
            c.andSelectOneIsNotNull();
        }
        if (selectOne != null) {
            c.andSelectOneEqualTo(selectOne);
        }
        if (selectOne_not != null) {
            c.andSelectOneNotEqualTo(selectOne_not);
        }
        if (selectOne_greater != null) {
            c.andSelectOneGreaterThan(selectOne_greater);
        }
        if (selectOne_greaterEqual != null) {
            c.andSelectOneGreaterThanOrEqualTo(selectOne_greaterEqual);
        }
        if (selectOne_less != null) {
            c.andSelectOneLessThan(selectOne_less);
        }
        if (selectOne_lessEqual != null) {
            c.andSelectOneLessThanOrEqualTo(selectOne_lessEqual);
        }
        if (selectOne_like != null) {
            c.andSelectOneLike(selectOne_like);
        }
        if (selectOne_notLike != null) {
            c.andSelectOneNotLike(selectOne_notLike);
        }
        if (selectOne_in != null) {
            c.andSelectOneIn(selectOne_in);
        }
        if (selectOne_notIn != null) {
            c.andSelectOneNotIn(selectOne_notIn);
        }
        if (selectOne_between1 != null) {
            c.andSelectOneBetween(selectOne_between1, selectOne_between2);
        }
        if (selectOne_notBetween1 != null) {
            c.andSelectOneNotBetween(selectOne_notBetween1, selectOne_notBetween2);
        }
        String updateSql_null = TypeCast.getString(workItemMap.get("updateSql_null"));
        String updateSql_notNull = TypeCast.getString(workItemMap.get("updateSql_notNull"));
        String updateSql = TypeCast.getString(workItemMap.get("updateSql"));
        String updateSql_not = TypeCast.getString(workItemMap.get("updateSql_not"));
        String updateSql_greater = TypeCast.getString(workItemMap.get("updateSql_greater"));
        String updateSql_greaterEqual = TypeCast.getString(workItemMap.get("updateSql_greaterEqual"));
        String updateSql_less = TypeCast.getString(workItemMap.get("updateSql_less"));
        String updateSql_lessEqual = TypeCast.getString(workItemMap.get("updateSql_lessEqual"));
        String updateSql_like = TypeCast.getString(workItemMap.get("updateSql_like"));
        String updateSql_notLike = TypeCast.getString(workItemMap.get("updateSql_notLike"));
        List<String> updateSql_in = TypeCast.getStringList(workItemMap.get("updateSql_in"));
        List<String> updateSql_notIn = TypeCast.getStringList(workItemMap.get("updateSql_notIn"));
        String updateSql_between1 = TypeCast.getString(workItemMap.get("updateSql_between1"));
        String updateSql_between2 = TypeCast.getString(workItemMap.get("updateSql_between2"));
        String updateSql_notBetween1 = TypeCast.getString(workItemMap.get("updateSql_notBetween1"));
        String updateSql_notBetween2 = TypeCast.getString(workItemMap.get("updateSql_notBetween2"));

        if (updateSql_null != null) {
            c.andUpdateSqlIsNull();
        }
        if (updateSql_notNull != null) {
            c.andUpdateSqlIsNotNull();
        }
        if (updateSql != null) {
            c.andUpdateSqlEqualTo(updateSql);
        }
        if (updateSql_not != null) {
            c.andUpdateSqlNotEqualTo(updateSql_not);
        }
        if (updateSql_greater != null) {
            c.andUpdateSqlGreaterThan(updateSql_greater);
        }
        if (updateSql_greaterEqual != null) {
            c.andUpdateSqlGreaterThanOrEqualTo(updateSql_greaterEqual);
        }
        if (updateSql_less != null) {
            c.andUpdateSqlLessThan(updateSql_less);
        }
        if (updateSql_lessEqual != null) {
            c.andUpdateSqlLessThanOrEqualTo(updateSql_lessEqual);
        }
        if (updateSql_like != null) {
            c.andUpdateSqlLike(updateSql_like);
        }
        if (updateSql_notLike != null) {
            c.andUpdateSqlNotLike(updateSql_notLike);
        }
        if (updateSql_in != null) {
            c.andUpdateSqlIn(updateSql_in);
        }
        if (updateSql_notIn != null) {
            c.andUpdateSqlNotIn(updateSql_notIn);
        }
        if (updateSql_between1 != null) {
            c.andUpdateSqlBetween(updateSql_between1, updateSql_between2);
        }
        if (updateSql_notBetween1 != null) {
            c.andUpdateSqlNotBetween(updateSql_notBetween1, updateSql_notBetween2);
        }
        Integer status_null = TypeCast.getInteger(workItemMap.get("status_null"));
        Integer status_notNull = TypeCast.getInteger(workItemMap.get("status_notNull"));
        Integer status = TypeCast.getInteger(workItemMap.get("status"));
        Integer status_not = TypeCast.getInteger(workItemMap.get("status_not"));
        Integer status_greater = TypeCast.getInteger(workItemMap.get("status_greater"));
        Integer status_greaterEqual = TypeCast.getInteger(workItemMap.get("status_greaterEqual"));
        Integer status_less = TypeCast.getInteger(workItemMap.get("status_less"));
        Integer status_lessEqual = TypeCast.getInteger(workItemMap.get("status_lessEqual"));
        List<Integer> status_in = TypeCast.getIntegerList(workItemMap.get("status_in"));
        List<Integer> status_notIn = TypeCast.getIntegerList(workItemMap.get("status_notIn"));
        Integer status_between1 = TypeCast.getInteger(workItemMap.get("status_between1"));
        Integer status_between2 = TypeCast.getInteger(workItemMap.get("status_between2"));
        Integer status_notBetween1 = TypeCast.getInteger(workItemMap.get("status_notBetween1"));
        Integer status_notBetween2 = TypeCast.getInteger(workItemMap.get("status_notBetween2"));

        if (status_null != null) {
            c.andStatusIsNull();
        }
        if (status_notNull != null) {
            c.andStatusIsNotNull();
        }
        if (status != null) {
            c.andStatusEqualTo(status);
        }
        if (status_not != null) {
            c.andStatusNotEqualTo(status_not);
        }
        if (status_greater != null) {
            c.andStatusGreaterThan(status_greater);
        }
        if (status_greaterEqual != null) {
            c.andStatusGreaterThanOrEqualTo(status_greaterEqual);
        }
        if (status_less != null) {
            c.andStatusLessThan(status_less);
        }
        if (status_lessEqual != null) {
            c.andStatusLessThanOrEqualTo(status_lessEqual);
        }
        if (status_in != null) {
            c.andStatusIn(status_in);
        }
        if (status_notIn != null) {
            c.andStatusNotIn(status_notIn);
        }
        if (status_between1 != null) {
            c.andStatusBetween(status_between1, status_between2);
        }
        if (status_notBetween1 != null) {
            c.andStatusNotBetween(status_notBetween1, status_notBetween2);
        }
        String cacheName_null = TypeCast.getString(workItemMap.get("cacheName_null"));
        String cacheName_notNull = TypeCast.getString(workItemMap.get("cacheName_notNull"));
        String cacheName = TypeCast.getString(workItemMap.get("cacheName"));
        String cacheName_not = TypeCast.getString(workItemMap.get("cacheName_not"));
        String cacheName_greater = TypeCast.getString(workItemMap.get("cacheName_greater"));
        String cacheName_greaterEqual = TypeCast.getString(workItemMap.get("cacheName_greaterEqual"));
        String cacheName_less = TypeCast.getString(workItemMap.get("cacheName_less"));
        String cacheName_lessEqual = TypeCast.getString(workItemMap.get("cacheName_lessEqual"));
        String cacheName_like = TypeCast.getString(workItemMap.get("cacheName_like"));
        String cacheName_notLike = TypeCast.getString(workItemMap.get("cacheName_notLike"));
        List<String> cacheName_in = TypeCast.getStringList(workItemMap.get("cacheName_in"));
        List<String> cacheName_notIn = TypeCast.getStringList(workItemMap.get("cacheName_notIn"));
        String cacheName_between1 = TypeCast.getString(workItemMap.get("cacheName_between1"));
        String cacheName_between2 = TypeCast.getString(workItemMap.get("cacheName_between2"));
        String cacheName_notBetween1 = TypeCast.getString(workItemMap.get("cacheName_notBetween1"));
        String cacheName_notBetween2 = TypeCast.getString(workItemMap.get("cacheName_notBetween2"));

        if (cacheName_null != null) {
            c.andCacheNameIsNull();
        }
        if (cacheName_notNull != null) {
            c.andCacheNameIsNotNull();
        }
        if (cacheName != null) {
            c.andCacheNameEqualTo(cacheName);
        }
        if (cacheName_not != null) {
            c.andCacheNameNotEqualTo(cacheName_not);
        }
        if (cacheName_greater != null) {
            c.andCacheNameGreaterThan(cacheName_greater);
        }
        if (cacheName_greaterEqual != null) {
            c.andCacheNameGreaterThanOrEqualTo(cacheName_greaterEqual);
        }
        if (cacheName_less != null) {
            c.andCacheNameLessThan(cacheName_less);
        }
        if (cacheName_lessEqual != null) {
            c.andCacheNameLessThanOrEqualTo(cacheName_lessEqual);
        }
        if (cacheName_like != null) {
            c.andCacheNameLike(cacheName_like);
        }
        if (cacheName_notLike != null) {
            c.andCacheNameNotLike(cacheName_notLike);
        }
        if (cacheName_in != null) {
            c.andCacheNameIn(cacheName_in);
        }
        if (cacheName_notIn != null) {
            c.andCacheNameNotIn(cacheName_notIn);
        }
        if (cacheName_between1 != null) {
            c.andCacheNameBetween(cacheName_between1, cacheName_between2);
        }
        if (cacheName_notBetween1 != null) {
            c.andCacheNameNotBetween(cacheName_notBetween1, cacheName_notBetween2);
        }
        Long expireTime_null = TypeCast.getLong(workItemMap.get("expireTime_null"));
        Long expireTime_notNull = TypeCast.getLong(workItemMap.get("expireTime_notNull"));
        Long expireTime = TypeCast.getLong(workItemMap.get("expireTime"));
        Long expireTime_not = TypeCast.getLong(workItemMap.get("expireTime_not"));
        Long expireTime_greater = TypeCast.getLong(workItemMap.get("expireTime_greater"));
        Long expireTime_greaterEqual = TypeCast.getLong(workItemMap.get("expireTime_greaterEqual"));
        Long expireTime_less = TypeCast.getLong(workItemMap.get("expireTime_less"));
        Long expireTime_lessEqual = TypeCast.getLong(workItemMap.get("expireTime_lessEqual"));
        List<Long> expireTime_in = TypeCast.getLongList(workItemMap.get("expireTime_in"));
        List<Long> expireTime_notIn = TypeCast.getLongList(workItemMap.get("expireTime_notIn"));
        Long expireTime_between1 = TypeCast.getLong(workItemMap.get("expireTime_between1"));
        Long expireTime_between2 = TypeCast.getLong(workItemMap.get("expireTime_between2"));
        Long expireTime_notBetween1 = TypeCast.getLong(workItemMap.get("expireTime_notBetween1"));
        Long expireTime_notBetween2 = TypeCast.getLong(workItemMap.get("expireTime_notBetween2"));

        if (expireTime_null != null) {
            c.andExpireTimeIsNull();
        }
        if (expireTime_notNull != null) {
            c.andExpireTimeIsNotNull();
        }
        if (expireTime != null) {
            c.andExpireTimeEqualTo(expireTime);
        }
        if (expireTime_not != null) {
            c.andExpireTimeNotEqualTo(expireTime_not);
        }
        if (expireTime_greater != null) {
            c.andExpireTimeGreaterThan(expireTime_greater);
        }
        if (expireTime_greaterEqual != null) {
            c.andExpireTimeGreaterThanOrEqualTo(expireTime_greaterEqual);
        }
        if (expireTime_less != null) {
            c.andExpireTimeLessThan(expireTime_less);
        }
        if (expireTime_lessEqual != null) {
            c.andExpireTimeLessThanOrEqualTo(expireTime_lessEqual);
        }
        if (expireTime_in != null) {
            c.andExpireTimeIn(expireTime_in);
        }
        if (expireTime_notIn != null) {
            c.andExpireTimeNotIn(expireTime_notIn);
        }
        if (expireTime_between1 != null) {
            c.andExpireTimeBetween(expireTime_between1, expireTime_between2);
        }
        if (expireTime_notBetween1 != null) {
            c.andExpireTimeNotBetween(expireTime_notBetween1, expireTime_notBetween2);
        }
        String cacheKeyField_null = TypeCast.getString(workItemMap.get("cacheKeyField_null"));
        String cacheKeyField_notNull = TypeCast.getString(workItemMap.get("cacheKeyField_notNull"));
        String cacheKeyField = TypeCast.getString(workItemMap.get("cacheKeyField"));
        String cacheKeyField_not = TypeCast.getString(workItemMap.get("cacheKeyField_not"));
        String cacheKeyField_greater = TypeCast.getString(workItemMap.get("cacheKeyField_greater"));
        String cacheKeyField_greaterEqual = TypeCast.getString(workItemMap.get("cacheKeyField_greaterEqual"));
        String cacheKeyField_less = TypeCast.getString(workItemMap.get("cacheKeyField_less"));
        String cacheKeyField_lessEqual = TypeCast.getString(workItemMap.get("cacheKeyField_lessEqual"));
        String cacheKeyField_like = TypeCast.getString(workItemMap.get("cacheKeyField_like"));
        String cacheKeyField_notLike = TypeCast.getString(workItemMap.get("cacheKeyField_notLike"));
        List<String> cacheKeyField_in = TypeCast.getStringList(workItemMap.get("cacheKeyField_in"));
        List<String> cacheKeyField_notIn = TypeCast.getStringList(workItemMap.get("cacheKeyField_notIn"));
        String cacheKeyField_between1 = TypeCast.getString(workItemMap.get("cacheKeyField_between1"));
        String cacheKeyField_between2 = TypeCast.getString(workItemMap.get("cacheKeyField_between2"));
        String cacheKeyField_notBetween1 = TypeCast.getString(workItemMap.get("cacheKeyField_notBetween1"));
        String cacheKeyField_notBetween2 = TypeCast.getString(workItemMap.get("cacheKeyField_notBetween2"));

        if (cacheKeyField_null != null) {
            c.andCacheKeyFieldIsNull();
        }
        if (cacheKeyField_notNull != null) {
            c.andCacheKeyFieldIsNotNull();
        }
        if (cacheKeyField != null) {
            c.andCacheKeyFieldEqualTo(cacheKeyField);
        }
        if (cacheKeyField_not != null) {
            c.andCacheKeyFieldNotEqualTo(cacheKeyField_not);
        }
        if (cacheKeyField_greater != null) {
            c.andCacheKeyFieldGreaterThan(cacheKeyField_greater);
        }
        if (cacheKeyField_greaterEqual != null) {
            c.andCacheKeyFieldGreaterThanOrEqualTo(cacheKeyField_greaterEqual);
        }
        if (cacheKeyField_less != null) {
            c.andCacheKeyFieldLessThan(cacheKeyField_less);
        }
        if (cacheKeyField_lessEqual != null) {
            c.andCacheKeyFieldLessThanOrEqualTo(cacheKeyField_lessEqual);
        }
        if (cacheKeyField_like != null) {
            c.andCacheKeyFieldLike(cacheKeyField_like);
        }
        if (cacheKeyField_notLike != null) {
            c.andCacheKeyFieldNotLike(cacheKeyField_notLike);
        }
        if (cacheKeyField_in != null) {
            c.andCacheKeyFieldIn(cacheKeyField_in);
        }
        if (cacheKeyField_notIn != null) {
            c.andCacheKeyFieldNotIn(cacheKeyField_notIn);
        }
        if (cacheKeyField_between1 != null) {
            c.andCacheKeyFieldBetween(cacheKeyField_between1, cacheKeyField_between2);
        }
        if (cacheKeyField_notBetween1 != null) {
            c.andCacheKeyFieldNotBetween(cacheKeyField_notBetween1, cacheKeyField_notBetween2);
        }
        String cacheType_null = TypeCast.getString(workItemMap.get("cacheType_null"));
        String cacheType_notNull = TypeCast.getString(workItemMap.get("cacheType_notNull"));
        String cacheType = TypeCast.getString(workItemMap.get("cacheType"));
        String cacheType_not = TypeCast.getString(workItemMap.get("cacheType_not"));
        String cacheType_greater = TypeCast.getString(workItemMap.get("cacheType_greater"));
        String cacheType_greaterEqual = TypeCast.getString(workItemMap.get("cacheType_greaterEqual"));
        String cacheType_less = TypeCast.getString(workItemMap.get("cacheType_less"));
        String cacheType_lessEqual = TypeCast.getString(workItemMap.get("cacheType_lessEqual"));
        String cacheType_like = TypeCast.getString(workItemMap.get("cacheType_like"));
        String cacheType_notLike = TypeCast.getString(workItemMap.get("cacheType_notLike"));
        List<String> cacheType_in = TypeCast.getStringList(workItemMap.get("cacheType_in"));
        List<String> cacheType_notIn = TypeCast.getStringList(workItemMap.get("cacheType_notIn"));
        String cacheType_between1 = TypeCast.getString(workItemMap.get("cacheType_between1"));
        String cacheType_between2 = TypeCast.getString(workItemMap.get("cacheType_between2"));
        String cacheType_notBetween1 = TypeCast.getString(workItemMap.get("cacheType_notBetween1"));
        String cacheType_notBetween2 = TypeCast.getString(workItemMap.get("cacheType_notBetween2"));

        if (cacheType_null != null) {
            c.andCacheTypeIsNull();
        }
        if (cacheType_notNull != null) {
            c.andCacheTypeIsNotNull();
        }
        if (cacheType != null) {
            c.andCacheTypeEqualTo(cacheType);
        }
        if (cacheType_not != null) {
            c.andCacheTypeNotEqualTo(cacheType_not);
        }
        if (cacheType_greater != null) {
            c.andCacheTypeGreaterThan(cacheType_greater);
        }
        if (cacheType_greaterEqual != null) {
            c.andCacheTypeGreaterThanOrEqualTo(cacheType_greaterEqual);
        }
        if (cacheType_less != null) {
            c.andCacheTypeLessThan(cacheType_less);
        }
        if (cacheType_lessEqual != null) {
            c.andCacheTypeLessThanOrEqualTo(cacheType_lessEqual);
        }
        if (cacheType_like != null) {
            c.andCacheTypeLike(cacheType_like);
        }
        if (cacheType_notLike != null) {
            c.andCacheTypeNotLike(cacheType_notLike);
        }
        if (cacheType_in != null) {
            c.andCacheTypeIn(cacheType_in);
        }
        if (cacheType_notIn != null) {
            c.andCacheTypeNotIn(cacheType_notIn);
        }
        if (cacheType_between1 != null) {
            c.andCacheTypeBetween(cacheType_between1, cacheType_between2);
        }
        if (cacheType_notBetween1 != null) {
            c.andCacheTypeNotBetween(cacheType_notBetween1, cacheType_notBetween2);
        }
        if (workItemMap.get("orderBy") != null) {
            workItemEx.setOrderByClause((String) workItemMap.get("orderBy"));
        }
        if (limitStart != null && limitOffset != null) {
            workItemEx.setLimitStart(limitStart);
            workItemEx.setLimitOffset(limitOffset);
        }

        return workItemEx;
    }
}
